home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include "files.h"
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- int i;
- char c;
- char *tnam;
- char terminalfile[14];
-
- i=umask(000); /*to make sure files are created with the right permissions.*/
-
-
- if (isatty(1)!=1)
- {
- fprintf(stdout," You cannot play from a file\n");
- exit(0);
- }
-
- tnam=(char *)ttyname(1);
- strcpy(terminalfile,tnam);
-
- /*Now make the terminal file rw access for everyone!*/
-
- if (chmod(terminalfile, 0666)<0)
- {
- fprintf(stdout,terminalfile);
- fprintf(stdout," : cannot chmod your terminal file!!!\n");
- exit(0);
- }
-
- if (argc==1)
- execl(SLAVEPROGRAM,"slave",(char *) 0);
- else
- {
- if (argc==2)
- execl(SLAVEPROGRAM,"slave",argv[1],(char *) 0);
- else
- {
- if (argc==3)
- execl(SLAVEPROGRAM,"slave",argv[1],argv[2],(char *) 0);
- else
- {
- fprintf(stderr,"Usage: mpss {-i} {-t}\n");
- exit(0);
- }
- }
- }
- }
-